package com.hmall.feign.client;

import com.hmall.feign.domain.dto.ItemDTO;
import com.hmall.feign.domain.dto.PageDTO;
import com.hmall.feign.domain.pojo.Item;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("itemservice")
public interface ItemClient {

    @GetMapping("/item/list")
    PageDTO<Item> ItemPage(@RequestParam("page")Long page, @RequestParam("size")Long size);

    @GetMapping("/item/{id}")
    ItemDTO getItemById(@PathVariable Long id);
}
